package com.learn.controller.user;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import com.learn.result.Result;
import com.learn.security.pojo.po.User;
import com.learn.security.pojo.vo.LoginVO;
import com.learn.security.service.UserService;

@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/user/login")
    public Result<LoginVO> login(@RequestBody User user) {
        return userService.login(user);
    }
}
